@import "common.less";

.loading-wap {
  z-index: 9999;
  .full-screen();
  display: flex;
  justify-content: center;
  align-items: center;

  .loader {
    width: 160/@ppr;
    height: auto;
  }
}

.loading {
  z-index: 999;
  .full-screen();
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .content {
    background: black;
    border-radius: 8/@ppr;
    padding: 8/@ppr 40/@ppr 8/@ppr 30/@ppr;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;

    .text {
      font-size: 28/@ppr;
      color: white;
      flex: 1;
      text-align: center;
    }

    .loader {
      font-size: 10px;
      margin-right: 20/@ppr;
      text-indent: -9999/@ppr;
      width: 40/@ppr;
      height: 40/@ppr;
      ;
      border-radius: 50%;
      background: #ffffff;
      background: linear-gradient(to right, @main-color 10%, rgba(255, 255, 255, 0) 42%);
      position: relative;
      -webkit-animation: load3 1.4s infinite linear;
      animation: load3 1.4s infinite linear;
      -webkit-transform: translateZ(0);
      -ms-transform: translateZ(0);
      transform: translateZ(0);
    }

    .loader:before {
      width: 50%;
      height: 50%;
      background: @main-color;
      border-radius: 100% 0 0 0;
      position: absolute;
      top: 0;
      left: 0;
      content: '';
    }

    .loader:after {
      background: black;
      width: 75%;
      height: 75%;
      border-radius: 50%;
      content: '';
      margin: auto;
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      right: 0;
    }

    @-webkit-keyframes load3 {
      0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
      }

      100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
      }
    }

    @keyframes load3 {
      0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
      }

      100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
      }
    }
  }
}

.page-loading {
  .full-screen();
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  .spinner {
    width: 160/@ppr;
    height: 160/@ppr;
    background-color: @main-color;
    -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
    animation: sk-rotateplane 1.2s infinite ease-in-out;
  }

  .text {
    font-size: 30/@ppr;
    color: #2e2e36;

    .retry {
      color: blue;
    }
  }
}

@keyframes sk-rotateplane {
  0% {
    transform: perspective(120px) rotateX(0deg) rotateY(0deg);
    -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
  }

  50% {
    transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
    -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
  }

  100% {
    transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
    -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
  }
}
